﻿#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using Omu.Awesome.Core;
using XPressify.Data;
using Omu.Awesome.Mvc;

#endregion

namespace XPressify.Models
{
    public class ListEventModel
    {
        public Event EventModel { get; set; }

        public bool IsOrganizer { get; set; }

        public bool IsMemberOf { get; set; }

        public BaseSubject Organizer { get; set; }

        public Guid Id { get; set; }
    }

    [Serializable]
    public class Invitee
    {
        public Guid Id { get; set; }

        public string FullName { get; set; }

        public bool Selected { get; set; }

        public string ProfilePicturePath { get; set; }
    }

    [Serializable]
    public class CreateEventModel
    {
        [Required]
        [Display(Name = "Start date")]
        [UIHint("DateTimeEvent")]
        public DateTime StartDate { get; set; }

        [Required]
        [Display(Name = "End date")]
        [UIHint("DateTimeEvent")]
        public DateTime EndDate { get; set; }

        [Required]
        [Display(Name = "Location")]
        public string Location { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Required]
        [Display(Name = "Privacy")]
        public int Privacy { get; set; }

        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Required]
        [Display(Name = "Members can post")]
        public bool MembersCanPost { get; set; }

    }

    public class DeleteEventModel
    {

        public Guid Id { get; set; }
    }

    public class EditEventModel
    {
        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Required]
        [Display(Name = "Start date")]
        [UIHint("DateTimeEvent")]
        public DateTime StartDate { get; set; }

        [Required]
        [Display(Name = "End date")]
        [UIHint("DateTimeEvent")]
        public DateTime EndDate { get; set; }

        [Required]
        [Display(Name = "Location")]
        public string Location { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Required]
        [Display(Name = "Members can post")]
        public bool MembersCanPost { get; set; }

        [Required]
        [Display(Name = "Privacy")]
        public string Privacy { get; set; }

        public Guid EventId { get; set; }
    }

    public class DetailsEventModel
    {
        [Display(Name = "Id")]
        public Guid Id { get; set; }

        [Display(Name = "Start date")]
        public DateTime StartDate { get; set; }

        [Display(Name = "End date")]
        public DateTime EndDate { get; set; }

        [Display(Name = "Location")]
        public string Location { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Name")]
        public string Name { get; set; }

        public DateTime Created { get; set; }

        public Guid WallAlbumId { get; set; }

        public User Organizer { get; set; }

        public bool IsOrganizitor { get; set; }

        public bool IsMemberOf { get; set; }

        public bool OrganizerBlocked { get; set; }

        public IQueryable<User> Participants { get; set; }

        public Guid SubjectId { get; set; }

        public Dictionary<Post, List<Post>> AllPosts { get; set; }

        public User CurrentUser { get; set; }

        public string CurrentUserProfilePicturePath { get; set; }

        public string WallAlbumCoverPath { get; set; }

        public short EventPrivacyType { get; set; }

        public bool HasCoverPicture { get; set; }

        public bool MembersCanPost { get; set; }
    }


    public class EventParticipants : Pageable<SuggestedParticipants>
    {
        public Guid EventId { get; set; }
        public Guid CurrentUserId { get; set; }
        public SuggestedParticipants[] Participants { get; set; }

    }

    public class SuggestedParticipants
    {
        
        public Guid Id { get; set; }

        public string FullName { get; set; }

        public bool Selected { get; set; }

        public string ProfilePicturePath { get; set; }
    }

    public class InviteEventModel
    {
        public Guid EventId { get; set; }

        public Guid CurrentUserId { get; set; }

        [Required]
        public IEnumerable<Guid> UsersSelected { get; set; }
    }

    public class ChangeAdminModel
    {
        public Guid EventId { get; set; }

        public Guid CurrentUserId { get; set; }

        [Required]
        public Guid SelectedId { get; set; }

        public Guid SubjectId { get; set; }

        public SuggestedParticipants[] Members { get; set; }
    }

}